<?php slot('title', __('Users list')) ?>
<?php slot('options') ?>
    <a href="<?php echo url_for('users/new') ?>"><img src="/sf/sf_admin/images/add.png" alt="add" /></a><a href="<?php echo url_for('users/new') ?>"><?php echo __('Add a new user') ?></a>
<?php end_slot() ?>

<table class="listing">
  <thead>
    <tr>
      <th><?php echo __('Id') ?></th>
      <th><?php echo __('Active') ?></th>
      <th><?php echo __('Admin') ?></th>
      <th><?php echo __('Full name') ?></th>
      <th><?php echo __('Email') ?></th>
      <th><?php echo __('Type') ?></th>
      <th class="actions"><?php echo __('Actions') ?></th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($users as $user): ?>
    <tr>
      <td><?php echo $user->getId() ?></td>
      <td><?php echo $user->getActive() ? __('Yes') : __('No') ?></td>
      <td><?php echo $user->getAdmin() ? __('Yes') : __('No') ?></td>
      <td><?php echo $user->getFullName() ?></td>
      <td><?php echo $user->getEmail() ?></td>
      <td><?php echo $userTypes[$user->getTypeId()] ?></td>
      <td class="actions">
          <a href="<?php echo url_for('users/edit?id='.$user->getId()) ?>"><img src="/sf/sf_admin/images/edit.png" alt="edit" /></a>
          <?php echo link_to('<img src="/sf/sf_admin/images/cancel.png" alt="delete" />', 'users/delete?id='.$user->getId(), array('method' => 'delete', 'confirm' => __('Are you sure?'))) ?>
      </td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>